import axios from "axios";

let instance = axios.create(
    {
        baseURL: "http://pcapi-xiaotuxian-front-devtest.itheima.net",
        timeout: 5000
    }
)
    instance.interceptors.request.use(config => {
    return config
    }, error => Promise.reject(error))

    instance.interceptors.response.use(config => {
    return config.data
    }, error => Promise.reject(error))

export default instance
